<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>高校教材管理系统</title>
	<%@ include file="./model/link.jsp" %>
	<script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/smooth-sliding-menu.js"></script>
</head>

<body>
	<%@ include file="./model/userInfoModel.jsp" %>
	
    <!-- 导航栏 -->
 	<%@ include file="./model/nav.jsp" %>
    <!-- 导航栏 /-->
	<div id="tip" style="position:fixed;"></div>
    <!-- 版心 -->
    
    <div class="wrapper">
    	<%@ include file="./model/Leftnav.jsp" %>
        <div class="page-content">
            <div class="content container">
                <div class="widget" style="overflow: inherit;">
			        <div class="widget-header"> 
			        	<i class="icon-list-ol"></i>
			            <h3>教材退订记录</h3>
			        </div>
			        	
			        <div class="widget-content">
			        	
 						<table class="table table-striped table-images">
                            <thead>
                                <tr>
	                                <th class="hidden-xs-portrait">退订单编号</th>
	                                <th>征订单编号</th>
	                                <th>书籍封面</th>
	                                <th>书号</th>
	                                <th class="hidden-xs-portrait">单价</th>
	                                <th class="hidden-xs">订单总价</th>
	                                <th class="hidden-xs">征订数量</th>
	                                <th class="hidden-xs">征订时间</th>
	                                <th class="hidden-xs">退订数量</th>
	                                <th class="hidden-xs">退订时间</th>
                                	<th></th>
                                </tr>
                            </thead>
			                <tbody>
			                  	<c:forEach items="${ordersDeal}" var="deal">
				                    <tr>
                                        <td class="hidden-xs-portrait">
                                        	${deal.refund_id}
                                        </td>
                                        <td class="hidden-xs-portrait">
                                        	${deal.order_id}
                                        </td>
                                        <td class="book-img-box" style="position:relative;cursor:pointer;">
                                        	<div class="big_img_box" style="right:-175%;">
                                        		<img src="${pageContext.request.contextPath}/img/book/${deal.book_imgsrc}" />
                                        	</div>
                                        	<img src="${pageContext.request.contextPath}/img/book/${deal.book_imgsrc}"/>
                                        </td>
                                        <td>
                                        	${deal.book_id}
                                        </td>
                                        <td>
                                        	${deal.book_price}
                                        </td>
                                        <td>
                                        	${deal.order_price}
                                        </td>
                                        <td>
                                        	${deal.order_number}
                                        </td>
                                        <td>
                                        	${deal.order_time}
                                        </td>
                                        <td>
                                        	${deal.order_refund_number}
                                        </td>
                                        <td>
                                        	${deal.refund_time}
                                        </td>
                                        <td>
                                        	<form action="${pageContext.request.contextPath}/orderDeal" method='post' onsubmit='return confirm("是否要删除这条记录？")'>
                                        		<input type='hidden' name="refund_id" value="${deal.refund_id}" />
                                        		<div class='inpu-group remove-order-Deal-box'>
                                        			<span>
                                        				<i class="icon-remove"></i>
                                        			</span>
                                        			<input class="btn btn-sm btn-primary" type="submit" value="订购"  style="display: inline-block;vertical-align: middle;"/>
                                        		</div>
                                        	</form>
                                        </td>
				                    </tr>
			                    </c:forEach>
			                </tbody>
			            </table>
			        </div>
			    </div>
            </div>
        </div>
    </div>
    <!-- 版心 /-->
    
    <!-- 底部 -->
	<%@ include file="./model/footer.jsp" %>
    <!-- 底部 /-->
	<script type="text/javascript" src="js/index.js"></script>
    <script>
    	jQuery('.footer').css('position','fixed')
    	var target = '${target}'
    	toggleStyleLeftNav(parseInt(target))
    	function toggleStyleLeftNav(index){
    	    jQuery(jQuery('#nav li')).removeClass("current")
    	    jQuery(jQuery('#nav li')[index]).addClass("current")
    	}
	    for(let i =0;i < jQuery('.book-img-box').length;i++){
	    	jQuery(jQuery('.book-img-box')[i]).on('mouseover',function (){
	    		jQuery(jQuery('.big_img_box')[i]).stop().fadeIn()
	    	})
	    	jQuery(jQuery('.book-img-box')[i]).on('mouseout',function (){
	    		jQuery(jQuery('.big_img_box')[i]).stop().fadeOut()
	    	})
	    }
    </script>
</body>

</html>